class Collection{
    constructor(arr){
        this.data=arr;
    }
    include(v){
        if(this.data.includes(v)){
            return true;
        }else{
            return false;
        }
    }
    cross(col){
        var res=[];
        for(var i in this.data){
            if(col.include(this.data[i])){
                res.push(this.data[i]);
            }
        }
        return new Collection(res);
    }
    union(col){
        var res=this.data;
        for(var i in col.data){
            if(this.include(col.data[i])==false)
                res.push(col.data[i]);
        }
        return new Collection(res);
    }
}

exports.Collection=Collection;